package com.java.oop;

enum Gender{//本质上就是一个class (继承Enum类型)
   //3个实例
   MALE("男"),FEMALE,NONE;
   Gender(){//默认private修饰
       System.out.println("Gender()");
   }
   private String name;
   Gender(String name){
       this.name=name;
   }
   public String getName() {
        return name;
   }
}
public class EnumTest01 {
    public static void main(String[] args) {
        System.out.println(Gender.MALE.getName());
    }
}
